﻿using System;

namespace Network
{
    public class NetAliveGameSrv : INetAlive
    {
        bool m_bWorking = false;
        DelegateChnlClose m_OnChnlClose = null;

        #region INetAlive接口
        public void InitChnl(NetChnl chnl)
        {}

        public void AddListener(DelegateChnlClose cb)
        {
            m_OnChnlClose -= cb;
            m_OnChnlClose += cb;
        }

        public void DelListener(DelegateChnlClose cb)
        {
            m_OnChnlClose -= cb;
        }

        public void StartHello()
        {
            m_bWorking = true;
        }

        public void StopHello()
        {
            m_bWorking = false;
        }
        #endregion

        public void SetNetBroken()
        {
            m_bWorking = false;
        }
    }
}
